<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>合众人寿公益平台客户管理系统e</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link href="<%= request.getContextPath() %>/html/css/Main.css"
			rel="stylesheet" type="text/css" />
		<style>
body,ul,ol,dl,dd,p,h1,h2,h3,h4,h5,h6,form,input,textarea,select,td,th {
	margin: 0;
	padding: 0;
	font-family: "宋体", Arial, Helvetica, sans-serif;
}

li {
	list-style: none;
}

.clear {
	zoom: 1;
}

.clear:after {
	content: "";
	display: block;
	clear: both;
}
</style>

		<script type="text/javascript">
		  function save(){
		   var fileName = document.getElementById("studentsFile").value;
		   if(fileName ==null || fileName.length == 0){
		   		alert("请输入上传文件");
		   		return false;
		   }
		   if(".XLS"==getExtention(fileName).toUpperCase()){
		   document.getElementById("fileName").value = document.getElementById("studentsFile").value;
		  document.getElementById("submit1").disabled=true;
		   return true;
		  }else{
		   alert("文件格式不正确，请选择.xls文件");
		   return false;
		  }
		  }
		  function getExtention(fileName){
		    var pos = fileName.lastIndexOf(".");
	        if (pos != -1){
	            return fileName.substring(pos);
	        }
	        else
	        {
          	  return ".";
            }
		  }
		</script>
	</head>

	<body>
		<div class="container">
			<div class="wrap clear">
				<div class="sub_wp_right">
					<div class="rt_tt">
						<h3 class="tittle">
							爱心之旅活动/成果/导入成果信息
						</h3>
					</div>
					<div class="ct">
						<div class="tiaojian">
							<form
								action="<%=request.getContextPath()%>/subAchievement/impSubAchievements.do"
								method="post" onsubmit="return save()"
								enctype="multipart/form-data" name="impForm">
							   	<input type="hidden" name="journeyLoveId" value="${journeyLoveId}" >	
								<div align="center">
									<font color="red" size="2px">请严格按照导入模板的格式，进行数据的导入</font>

								<table>
									<tr>
										<td align="right">
											<span>导入成果<font color="red">(*)</font>：</span>
										</td>
										<td class="t2">
											<input type="file" name="studentsFile" id="studentsFile" />
										</td>
									</tr>
								</table>
								</div>
								<input type="hidden" name="fileName" id="fileName" />
								<div class="btn">
									<input type="submit" name="imp" value="导入" id="submit1"/>
									<input type="button" name="expDemo" value="导出模板"
										onclick="location=('<%=request.getContextPath()%>/subAchievement/expDemo.do')" />
									<input type="button" value="返回"
										onclick="javascript :history.back(-1);" />
								</div>
							</form>

						</div>
					</div>
				</div>
			</div>
		</div>

	</body>
</html>
